﻿/**************************************************************
*作者：Leon
*创建时间：2022/4/30 15:09:41
**************************************************************/
using CourseManagerment.Model;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Security.Cryptography;

namespace CourseManagement.Service;

public interface ICourseManagementRepository
{
    /// <summary>
    /// 用户信息验证
    /// </summary>
    /// <param name="userName"></param>
    /// <param name="pwd"></param>
    /// <returns></returns>
    User CheckUserInfo(string userName, string pwd);
}

public interface ICourseManagementService
{
    User CheckUserInfo(string userName, string pwd);
}
class MD5Provider
{
    public static string GetMD5String(string str)
    {
        MD5 md = MD5.Create();
        byte[] pws = md.ComputeHash(System.Text.Encoding.UTF8.GetBytes(str));
        string pwd = "";
        foreach (var item in pws)
        {
            pwd += item.ToString("X2");
        }
        return pwd;
    }
}
